AE 443 · Experimental Dynamics & Control Laboratory · Spring 2026 · ERAU
Role
Team Member — PID Tuning & System Identification
AE 443: Experimental Dynamics & Control · ERAU · Spring 2026
Tools
MATLAB · Simulink · QUARC Real-Time Control
Transfer Function Analysis · Bode / Frequency Response
Key Contributions
This page walks through the pitch-axis control design for the Quanser Aero lab platform — from characterizing the open-loop dynamics, through individually tuning each PID term, to deriving an analytical second-order model and comparing it against the empirically tuned controller.
The Quanser Aero is a two-degree-of-freedom laboratory platform that mimics the pitch and yaw dynamics of a helicopter body. Two brushless DC motors drive propellers mounted at the ends of a rigid arm; the resulting thrust forces create moments about the pitch axis (elevation) and the yaw axis (travel). The platform is instrumented with encoders on both axes and connects to a host PC through QUARC real-time software, which closes the control loop in hardware at millisecond sampling rates. Because the aerodynamic coupling, inertia, and motor dynamics are all present, the Quanser Aero provides a physically meaningful testbed for classic control techniques well beyond pure simulation.
This project focused exclusively on the pitch axis. The objectives were:
The experiment began with a unity-feedback step response on the uncompensated pitch axis to measure baseline dynamics. From the measured response, the following key points were identified:
These values were used to compute the standard second-order metrics:
| Parameter | Symbol | Value |
|---|---|---|
| Peak Time | tp | 1.694 s |
| Settling Time (5%) | Ts | 13.63 s |
| Percentage Overshoot | PO | 68.96% |
| Damping Ratio | ζ | 0.1178 |
| Natural Frequency | ωn | 1.865 rad/s |
With a damping ratio of ζ = 0.1178, the uncompensated Quanser Aero pitch axis is highly underdamped. The 68.96% overshoot and 13.63-second settling time confirm that compensation is required before the platform can track any meaningful command.
Proportional gain kp was varied from 5 to 10 in steps of 2.5.
Proportional control alone could not satisfy both the peak time and overshoot requirements simultaneously.
Derivative gain kd was varied from 4 to 8 in steps of 2, with kp held fixed.
With the square-wave input active, integral gain ki was varied from 3 to 6 in steps of 1.5.
The three gains were tuned simultaneously on the hardware until the combined response met all design requirements. The final tuned gains were kp = 8, kd = 3.1, ki = 5. These values were chosen by first setting kp high enough for fast rise, then adding kd to suppress oscillations, and finally increasing ki incrementally to drive out the remaining steady-state error without reintroducing instability.
| Parameter | Value | Specification | Met? |
|---|---|---|---|
| Peak Time (tp) | 1.18 s | < 1.1 s | ✗ (marginal) |
| Percentage Overshoot | 4.12% | Peak ≤ 0.35 rad | ✓ |
| Steady-State Value | 0.2976 rad | ~0.3 rad | ✓ |
A second independent step response was recorded under unity feedback to derive a second-order plant model. From the measured data (ypeak = 0.4755 rad, yss = 0.2546 rad, tp = 1.442 s), the following model parameters were calculated:
The resulting second-order transfer function approximating the Quanser Aero pitch axis is:
G(s) = 1.27332 / (s2 + 0.10047s + 3.62403)
To validate the model, its simulated step response was overlaid with the experimental plant response. The agreement was strong: peak time error was only 0.14%, percent overshoot error was 3.48%, and steady-state difference was 3.61%. The small errors confirm the approximation captures the dominant dynamics well, though higher-order effects (friction, actuator saturation) prevent a perfect match.
Using the identified transfer function coefficients (a = 1.27332, b = 0.10047, c = 3.62403) and a target of critically damped response (ζd = 1, ωnd = 2 rad/s) with integrator zero p0 = 1, the three PID gains were solved analytically:
For hardware testing, the workbook solution values (kp = 3.3739, kd = 3.7484, ki = 3.06) were used. These produced a critically damped square-wave response with 0% overshoot and a peak time of 4.64 s — considerably slower than the tuned controller due to the conservative critical damping target and the limitations of the second-order approximation.
Design Decision
Trade-off: The analytically derived gains targeted a critically damped response, producing 0% overshoot but a peak time of 4.64 s — nearly four times slower than the empirically tuned controller's 1.18 s.
Why: The conservative critical-damping target, combined with the second-order model's limitations (it does not capture friction or actuator saturation), made the analytical gains too sluggish for square-wave tracking. Empirical tuning of kp = 8, kd = 3.1, ki = 5 on the actual hardware compensated for these unmodeled effects and met the speed requirement directly.
Bode plots were generated in MATLAB for both the open-loop plant and the PID-compensated open loop. The plant transfer function G(s) = ωn2 / (s2 + 2ζωns + ωn2) was combined with the PID controller C(s) = kp + ki/s + kds, and the margin() function was used to extract gain margins, phase margins, and bandwidth.
| System | Phase Margin | Gain Margin | Bandwidth |
|---|---|---|---|
| Open Loop (plant only) | 3.68° | ∞ | N/A |
| PID Compensated | 87.5° | ∞ | 19.32 rad/s |
The open-loop plant has a phase margin of only 3.68°, placing it right at the edge of instability — consistent with the severe oscillations seen in the open-loop step response. Adding the PID controller drives the phase margin to 87.5°, a dramatic improvement indicating robust stability with ample damping. The gain margin is infinite for both cases because the phase never crosses −180° in the frequency range of interest.
The identified second-order transfer function was converted to state-space form by defining states x1 = y (pitch angle) and x2 = ˙y (pitch rate). The resulting matrices are:
A = [[0, 1], [−ωn2, −2ζωn]] B = [[0], [ωn2]] C = [1, 0] D = [0]
The controllability matrix Pc has determinant −ωn4 ≠ 0 and rank 2, confirming the system is fully controllable. The observability matrix Po = I2×2, so det(Po) = 1 and rank = 2, confirming full observability. Although the system satisfies the necessary conditions for state-feedback control, PID remains the more practical choice here: the plant is simple enough that the additional complexity of a full state observer is not justified.
Manual tuning outperformed model-based design for tracking a square-wave command.
The analytically calculated gains produced 0% overshoot but tracked the command too slowly (tp = 4.64 s vs. 1.18 s for the tuned controller). The second-order model was adequate for linear analysis but missed friction, actuator limits, and higher-order dynamics that empirical tuning naturally compensated for.
PID compensation transformed a nearly unstable plant into a robustly stable closed loop.
The open-loop Quanser Aero pitch axis had a phase margin of only 3.68° — one small perturbation from instability. Adding the PID controller raised the phase margin to 87.5°, transforming a poorly damped (ζ = 0.0452) system into one with reliable, repeatable square-wave tracking.
Each gain has a distinct, quantifiable trade-off between speed and stability.
Increasing kp alone pushed overshoot past 60%; increasing kd alone pushed peak time past 2.6 s; increasing ki alone caused oscillations at the square-wave transitions. The final tuned combination (kp = 8, kd = 3.1, ki = 5) balanced all three effects to satisfy both speed and damping requirements simultaneously.
A second-order step-response model can capture dominant dynamics with <4% error.
The identified transfer function G(s) = 1.27332 / (s2 + 0.10047s + 3.62403) reproduced the hardware step response with 0.14% peak-time error and 3.48% overshoot error. This validates the second-order approximation method as a fast, practical tool for controller pre-design, even when the real plant contains unmodeled nonlinearities.